import styles from './index.module.less';
import classnames from 'classnames';
import { useTranslation } from 'react-i18next';

const Footer: React.FC<any> = () => {
  const arr = ['React', 'TypeScript', 'AntD'];
  const { t } = useTranslation();
  return (
    <footer className={styles.footer_box}>
      <p className={styles.footer_p}>
        <span>{t('footer.title')}</span>
        <a
          href="https://gitee.com/li8609/react-vite"
          target="_blank"
          rel="noreferrer"
          className={styles.footer_icp}
        >
          {'「'}
          {t('footer.code')}
          {'」'}
        </a>
      </p>
      <p className={styles.footer_p}>
        <a
          href="https://beian.miit.gov.cn/#/Integrated/index"
          target="_blank"
          rel="noreferrer"
          className={styles.footer_icp}
        >
          浙ICP备2021028745号-1
        </a>
      </p>
      <p className={classnames(styles.footer_p, styles.footer_p_last)}>
        {arr.map((item, index) => (
          <span className={styles.footer_p_last_span} key={index}>
            {item}
          </span>
        ))}
      </p>
    </footer>
  );
};

export default Footer;
